.cm-date-picker-value {
    display: flex;
    flex: 1;
    flex-direction: row;
    align-items: center;
    position: relative;
    height: var(--height-control-default);
    outline: 0;
    padding: 0 16px 0 6px;
    border: 1px solid var(--cui-default-border);
    border-radius: var(--cui-border-radius-small);
    color: var(--cui-color-text-1);
    background-color: #fff;
    background-image: none;
    transition: all ease-in-out .15s;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.cm-date-picker-text {
    display: block;
    height: 30px;
    line-height: 30px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.cm-date-picker{
    display: inline-flex;
    position: relative;
    height: var(--height-control-default);
    &.cm-date-picker-large{
        height: var(--height-control-large);
    }
    &.cm-date-picker-small{
        height: var(--height-control-small);
    }
}

.cm-date-picker-wrap{
    display: inline-flex;
    flex-direction: row;
    background-color: var(--cui-color-bg-3);
    box-sizing: border-box;
    border-radius: var(--cui-border-radius-small);
    z-index: 900;
    .cm-date-picker-month:first-child:not(:last-child) {
        &::after {
            content: '';
            position: absolute;
            height: 100%;
            right: 0;
            top: 0;
            border-right: 1px solid var(--cui-default-border);
        }
    }
}
.cm-date-picker-date-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 5px;
    user-select: none;
    gap: 2px;
    span{
        cursor: pointer;
        flex: 1;
        text-align: center;
        justify-content: center;
        color: var(--cui-color-text-2);
        transition: all 0.2s linear;
        font-size: 14px;
        border-radius: 3px;
        line-height: 30px;
        &:hover {
            background-color: var(--cui-color-fill-0);
        }
    }
    .cm-date-picker-header-arrow {
        display: inline-flex;
        width: 28px;
        height: 28px;
        justify-content: center;
    }
    .cm-icon {
        cursor: pointer;
        width: 28px;
        height: 28px;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        color: var(--cui-color-text-2);
        transition: all 0.2s linear;
        &:hover {
            color: rgb(var(--cui-grey-5));
            background-color: var(--cui-color-fill-0);
        }
    }
}
.cm-date-picker-date-info {
    flex: 1;
}
.cm-date-picker-week-line {
    display: flex;
    flex-direction: row;
    align-items: center;
    border-bottom: 1px solid var(--cui-color-disabled-border);
    margin-bottom: 5px;
    div {
        display: inline-block;
        width: 32px;
        height: 32px;
        line-height: 32px;
        text-align: center;
        color: rgb(var(--cui-grey-5));
        font-size: 12px;
    }
}
.cm-date-picker-date {
    width: 244px;
    .cm-date-picker-date-inner {
        padding: 10px;
    }
    .cm-date-picker-month {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    .cm-date-picker-month-body {
        flex: 1;
    }
    .cm-month-picker-cell {
        max-height: 220px;
    }
}
.cm-date-picker-month{
    width: 180px;
    padding: 0px;
    position: relative;
}
.cm-date-picker-month-body {
    display: flex;
    flex-direction: row;
}
.cm-date-picker-day {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    margin: 0;
    text-align: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    color: var(--cui-color-text-1);
    em{
        position: relative;
        z-index: 1;
        display: inline-block;
        font-style: normal;
    }
    &:before{
        content: '';
        position: absolute;
        display: block;
        left: 2px;
        right: 2px;
        top: 2px;
        bottom: 2px;
        border-radius: var(--cui-border-radius-small);
        transition: all 0.2s linear;
    }
    &:hover:before{
        background-color: var(--cui-color-fill-2);
    }
}
.cm-date-picker-empty {
    pointer-events: none;
}
.cm-date-picker-today {
    &:after{
        content: '';
        position: absolute;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        top: 2px;
        right: 2px;
        background-color: var(--cui-color-primary-hover);
    }
}
.cm-date-picker-active {
    color: #fff;
    &:hover:before,
    &:before{
        background-color: var(--cui-color-primary);
    }
}

.cm-date-picker-disabled {
    &:focus-within .cm-date-picker-value,
    &:hover .cm-date-picker-value,
    .cm-date-picker-value{
        border-color: var(--cui-color-disabled-border);
        background-color: #f3f3f3;
        opacity: 1;
        cursor: not-allowed;
        color: #ccc;
    }
}
.cm-date-picker-clearable {
    .cm-date-picker-value:hover{
        .cm-date-picker-clear{
            display: inline-block;
        }
        .cm-date-picker-cert{
            display: none;
        }
    }
}
.cm-date-picker-day-disabled {
    color: var(--cui-color-disabled-text);
    cursor: default;
    pointer-events: none;
    
    &.cm-date-picker-active::before {
        background-color: var(--cui-color-primary-light-hover);
    }
}

.cm-month-picker-cell {
    flex: 1;
    max-height: 182px;
    float: left;
    overflow: hidden;
    border-right: 1px solid var(--cui-default-border);
    position: relative;
    scroll-behavior: smooth;
    &:last-child{
        border-right: 0
    }
    ul{
        width: 100%;
        margin: 0;
        padding: 0 0 194px;
        list-style: none;
        li{
            width: 100%;
            height: 26px;
            line-height: 26px;
            margin: 0;
            box-sizing: content-box;
            text-align: center;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            cursor: pointer;
            list-style: none;
            transition: background .2s ease-in-out;
        }
    }
    &::-webkit-scrollbar {
        display: none;
    }
    &:hover{
        overflow-y: auto;
    }
}
.cm-month-picker-cell ul li:hover{
    background: var(--cui-color-fill-0);
}
.cm-month-picker-item-active{
    color: var(--cui-color-text-0);
    background: var(--cui-color-primary-light-hover);
}
.cm-month-picker-item-disabled{
    color: var(--cui-color-disabled-text);
    cursor: not-allowed!important;
    background: transparent!important;
}
.cm-date-picker-month-header {
    border-bottom: 1px solid var(--cui-default-border);
    padding: 11px;
    height: 56px;
}
.cm-date-picker-month-back-btn {
    box-shadow: none;
}


.cm-date-picker-inhover{
    &:before{
        left: 0;
        right: 0;
        background-color: var(--cui-color-fill-2);
        border-radius: 0;
    }
}
.cm-date-picker-inrange{
    &:hover:before{
        background-color: var(--cui-color-primary-hover);
    }
    &:before{
        left: 0;
        right: 0;
        background-color: var(--cui-color-primary-hover);
        border-radius: 0;
    }
    em{
        color: #fff;
    }
    &.cm-date-picker-last-range:before{
        border-top-right-radius: 3px;
        border-bottom-right-radius: 3px;
    }
    &.cm-date-picker-first-range:before{
        border-top-left-radius: 3px;
        border-bottom-left-radius: 3px;
    }
    &.cm-date-picker-today {
        &:after{
            background-color: #eee;
        }
    }
}

.cm-date-picker-shortcuts{
    background: var(--cui-color-bg-2);
    border-right: 1px solid var(--cui-color-border);
    border-radius: var(--cui-border-radius-small) 0 0 var(--cui-border-radius-small);
    overflow: auto;
}

.cm-datetime-switch {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--cui-color-disabled-border);
}
.cm-datetime-switch-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    color: rgb(var(--cui-grey-5));
    cursor: pointer;
    transition: all 0.2s linear;
    font-size: 14px;
    gap: 5px;
    &:hover {
        background-color: rgb(var(--cui-grey-1));
    }
    &.active {
        color: rgb(var(--cui-grey-8));
    }
}
.cm-date-picker-datetime {
    width: 244px;
    .cm-time-picker-options {
        width: 100%;
    }
    .cm-time-picker-cell {
        flex: 1;
        max-height: 224px;
        ul {
            padding: 0 0 198px;
        }
    }
    .cm-time-picker-header {
        height: 56px;
        padding: 11px;
        line-height: 34px;
    }
}
.cm-date-picker-date-row {
    white-space: nowrap;
}
.cm-date-picker-wrap-weekRange,
.cm-date-picker-wrap-week {
    .cm-date-picker-date-row {
        border-radius: var(--cui-border-radius-small);
        &:hover {
            background-color: var(--cui-color-fill-2);
        }
    }
    .cm-date-picker-day:hover::before {
        background: transparent;
    }
}
.cm-date-picker-wrap-weekRange,
.cm-date-picker-wrap-week {
    .cm-date-picker-date-row.cm-date-picker-date-row-active {
        background-color: var(--cui-color-primary);
        .cm-date-picker-day {
            color: #fff;
        }
    }
}

.cm-date-picker-quarter {
    padding: 10px;
}
.cm-date-picker-quarter-body {
    display: flex;
    flex-direction: row;
    gap: 5px;
    margin-top: 16px;
    .cm-date-picker-quarter-item {
        flex: 1;
        width: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 2px;
        transition: all 0.2s linear;
        border-radius: var(--cui-border-radius-small);
        &:hover {
            background-color: var(--cui-color-fill-2);
        }
        &.active {
            background-color: var(--cui-color-primary);
            color: #fff;
        }
    }
}

.cm-date-picker-wrap-monthRange,
.cm-date-picker-wrap-month {
    .cm-date-picker-date-row {
        border-radius: var(--cui-border-radius-small);
        &:hover {
            background-color: var(--cui-color-fill-2);
        }
    }
    .cm-date-picker-day:hover::before {
        background: transparent;
    }
}

.cm-date-picker-type-yearRange,
.cm-date-picker-type-year {
    .cm-date-picker-month {
        width: 90px;
    }
}

.cm-date-picker-type-date {
    min-width: 145px;
}
.cm-date-picker-type-dateTime {
    min-width: 185px;
}
.cm-date-picker-type-year,
.cm-date-picker-type-month {
    min-width: 110px;
}
.cm-date-picker-type-dateRange {
    min-width: 270px;
}
.cm-date-picker-type-dateTimeRange {
    min-width: 360px;
}
.cm-date-picker-type-yearRange {
    min-width: 160px;
}
.cm-date-picker-type-monthRange {
    min-width: 220px;
}
.cm-date-picker-type-week {
    min-width: 110px;
}
.cm-date-picker-type-weekRange {
    min-width: 220px;
}
.cm-date-picker-type-quarter {
    min-width: 110px;
}
.cm-date-picker-type-quarterRange {
    min-width: 220px;
}

.cm-date-picker-compact {
    font-size: 12px;
    .cm-date-picker-date {
        width: 202px;
        .cm-month-picker-cell {
            max-height: 176px;
            ul {
                padding: 0 0 150px;
            }
        }
    }
    .cm-date-picker-datetime {
        width: 202px;
        .cm-time-picker-cell {
            max-height: 176px;
            ul {
                padding: 0 0 150px;
            }
        }
    }
    .cm-date-picker-week-line div,
    .cm-date-picker-day {
        width: 26px;
        height: 26px;
        line-height: 26px;
    }
    .cm-date-picker-date-header span {
        font-size: 12px;
        line-height: 24px;
    }
    .cm-date-picker-date-header .cm-date-picker-header-arrow {
        width: 24px;
        height: 24px;
    }
    .cm-datetime-switch-item {
        font-size: 12px;
    }
}